<extend name="../app/Admin/View/default/common/dashboard_layout.html"/>
<block name="content">
<!-- Content Header (Page header) -->
<section class="content-header clearfix">
    <h1 class="pull-left">短信发送日志</h1>
</section>
<!-- Main content -->
<section class="content" n-id="{$log_id}">
    <div class="row mb-20">
    </div>
    <div class="box box-solid">
        <div class="box-body no-padding">
            <div class="nav-tabs-custom">
                <div class="tab-content no-padding mt-10">
                    <table class="table table-hover">
                        <thead>
                            <tr>
                                <th>内容</th>
                                <th>发件人</th>
                                <th>时间</th>
                                <th>发送数量</th>
                                <th>结果</th>
                                <th width="240">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <volist name="list" id="vo">
                                <tr>
                                    <td>{:cutLength($vo['body'],20)}</td>
                                    <td>{:getUserName($vo['create_user'])}</td>
                                    <td>{:date('Y-m-d H:i:s', $vo['create_date'])}</td>
                                    <td>{$vo.total}</td>
                                    <td>
                                        <div>
                                            <span class='sparkline' value='{$vo.sparkline}'></span><span>{$vo.sparkline_str}</span>
                                        </div>
                                    </td>
                                    <td>
                                        <a href="{:addons_url('SmsBatchSend://SmsBatch/viewLog', array('id' => $vo['id']))}" class="btn btn-primary btn-xs">查看</a>
                                    </td>
                                </tr>
                            </volist>
                        </tbody>
                    </table>
                </div><!-- /.tab-content -->
            </div>
        </div><!-- /.box-body -->
    </div><!-- /.box -->
    <div class="row">
        <div class="col-md-5">
        </div>
        <div class="col-md-7">
            <div class="pull-right">
                <include file="../app/Admin/View/default/common/pagination.html" />
            </div>
        </div>
    </div>
</section><!-- /.content -->


<script type="text/javascript" src="__PUBLIC__/libs/jquery.sparkline.min.js"></script>
<script type='text/javascript'>
  jQuery(document).ready(function ($) {
    $(".sparkline").each(function() {
        var val = $(this).attr('value');
        $(this).sparkline(val.split(','), {
          type: 'pie',
          sliceColors: ['green','red']
        });
    });
  });
</script>
</block>
